package cn.hjh.dao;

import cn.hjh.pojo.Dept;

import java.io.Serializable;
import java.util.List;


public class DeptDao extends BaseDao {

	public void save(Dept dept){
		this.currentSession().save(dept);
	}

	public Dept load(Serializable deptno){
		return (Dept) this.currentSession().load(Dept.class,deptno);
	}

	public void delete(Dept dept){
		this.currentSession().delete(this.load(dept.getDeptno()));
	}

	public Dept findById(Integer deptno){
		return (Dept) this.currentSession().load(Dept.class,deptno);
	}
}
